<?php defined('SYSPATH') OR die('No direct access allowed.');

class Clientdata_Controller extends Viewbase_Controller {

	public function __construct(){
		
		$this->modelname='clientdata';	
		$this->controllername='clientdata';
		$this->parent_column='client_id';
		$this->orderby=array('title'=>'asc');
			
		parent::__construct();	
	}
	public function index(){
		$this->listall();
	}
	
	public function __postprocess_model($model){
		
		$model->upload_file('file');
		$model->save();		
	}
	
	
	public function __last_words($model){
		if(file_exists($model->url)){
			unlink($model->url);
		}
	}

}
